<template>
    <div class="box">
        <MyMtHeader titleText="商品足迹统计图" />
        <div id="main" style="width: 100%;height:400px;"></div>
    </div>
</template>

<script>
import * as echarts from 'echarts'
import MyMtHeader from '../MyMtHeader/MyMtHeader.vue';
export default {
  components: { MyMtHeader },
    data(){
        return {
            option :{
                tooltip: {},
                legend: {
                    data:['销量']
                },
                xAxis: {
                    data: ["01-25","","01-24","","01-29",'',"01-31"]
                },
                yAxis: {},
                series: [{
                    name: '销量',
                    type: 'bar',
                    data: [
                        {
                            value:54,
                            itemStyle: {
                                color: '#a90000'
                            }
                        },
                        {
                            value:11,
                            itemStyle: {
                                color: '#a90000'
                            }
                        },
                        {
                            value:40,
                            itemStyle: {
                                color: '#a90000'
                            }
                        },
                        {
                            value:34,
                            itemStyle: {
                                color: '#a90000'
                            }
                        },
                        {
                            value:2,
                            itemStyle: {
                                color: '#a90000'
                            }
                        },
                        {
                            value:0,
                            itemStyle: {
                                color: '#a90000'
                            }
                        },
                        {
                            value:10,
                            itemStyle: {
                                color: '#a90000'
                            }
                        }]
                }]
            }
        }
    },
    mounted(){
         let myChart = echarts.init(document.getElementById('main'));
         myChart.setOption(this.option);
    }
}
</script>

<style scoped>
#main{
}
</style>